Skip to content

Remove obsolete snapshot compatibility paths - #1715

Merged
ludfjig merged 1 commit into
hyperlight-dev:mainfrom
ludfjig:cleanup-snapshot-compatibility
Aug 20, 2026
Merged

Remove obsolete snapshot compatibility paths#1715
ludfjig merged 1 commit into
hyperlight-dev:mainfrom
ludfjig:cleanup-snapshot-compatibility

Conversation

@ludfjig

@ludfjig ludfjig commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Removes optional MSR/original-elf-entrypoint snapshot loading path. This is correct because #1674 breaks all existing snapshot on disk, so we can do these breakign changes as well.

Will mark ready once #1674 is merged.

closes #1654

@ludfjig ludfjig added the kind/refactor For PRs that restructure or remove code without adding new functionality. label Aug 10, 2026
@ludfjig
ludfjig force-pushed the cleanup-snapshot-compatibility branch from b9dd787 to 7839317 Compare August 20, 2026 16:07
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig
ludfjig force-pushed the cleanup-snapshot-compatibility branch from 7839317 to 324b2fd Compare August 20, 2026 16:43
@ludfjig
ludfjig marked this pull request as ready for review August 20, 2026 16:43
Copilot AI lite review requested due to automatic review settings August 20, 2026 16:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes two snapshot-loading compatibility fallbacks in hyperlight-host (missing msrs and original_entrypoint_addr == 0) now that snapshot format breakage is acceptable per #1654/#1674 context, and updates validation, tests, and documentation accordingly.

Changes:

  • Make original_entrypoint_addr required and reject 0 by validating it must be within the snapshot region.
  • Make msrs required on x86_64 by removing the missing-field serde fallback and updating tests to assert rejection.
  • Remove the completed “compatibility cleanup” notes from docs/snapshot-versioning.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/hyperlight_host/src/sandbox/snapshot/file/config.rs Removes serde defaults and tightens validation around original_entrypoint_addr and msrs; updates related unit tests and schema pin data.
src/hyperlight_host/src/sandbox/snapshot/file_tests.rs Updates on-disk mutation tests to expect load failures for missing msrs and original_entrypoint_addr == 0.
docs/snapshot-versioning.md Drops now-applied compatibility-cleanup items from the versioning documentation.
Suppressed comments (1)

src/hyperlight_host/src/sandbox/snapshot/file/config.rs:189

  • The MSR comment says "An empty field" which reads like the key can be omitted, but the PR makes msrs required on x86_64. Use wording that matches the serialized shape (array present, possibly empty) and call out that the field is required.
    /// The MSRs saved in this snapshot. An empty field restores the destination
    /// baseline.
    #[cfg(target_arch = "x86_64")]
    pub(super) msrs: Vec<MsrEntry>,

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/hyperlight_host/src/sandbox/snapshot/file/config.rs
@ludfjig
ludfjig merged commit df9b213 into hyperlight-dev:main Aug 20, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor For PRs that restructure or remove code without adding new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up code when breaking snapshot compatibility

3 participants